<template>
	<view class="search" @click="toSearch">
		<view class="content" >
			<icon class="icon-small" type="search" size="14"></icon>
			<text>搜索</text>
		</view>
		</view >
</template>

<script>
	export default {
		data() {
			return {
       
			};
		},
		methods:{
			toSearch(){
				uni.showLoading({
					title:'加载中'
				})
				// 跳转到搜索页面
				uni.navigateTo({
					url:"../searchHistory/searchHistory",
					complete(err){
						console.log(err)
						uni.hideLoading()
					}
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.search {
		box-sizing: border-box;
		width: 100%;
		position: fixed;
		top: 0;
		left: 0;
		padding: 20rpx 16rpx;
		background-color: #eb4450;
		text-align: center;

		.content {
			display: flex;
			justify-content: center;
			align-items: center;
			background-color: #FFFFFF;
			height: 60rpx;
			border-radius: 5rpx;
			color: #c2c2c2;

			icon {
				margin-right: 5rpx;
			}

		}
	}
</style>
